package cn.itcast.bos.service.base.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.base.SubAreaRepository;
import cn.itcast.bos.domain.base.SubArea;
import cn.itcast.bos.service.base.SubAreaService;
@Service
@Transactional
public class SubAreaServiceImpl implements SubAreaService {
	
	
	//注入Dao
	@Autowired
	private SubAreaRepository SubAreaRepository;
	@Override
	public void saveExcel(List<SubArea> subAreasList) {
		SubAreaRepository.save(subAreasList);
		
	}
	@Override
	public Page<SubArea> findpageData(Specification<SubArea> specification, Pageable pageable) {
	
		return SubAreaRepository.findAll(specification,pageable);
	}
	@Override
	public void save(SubArea model) {
		SubAreaRepository.save(model);
		
	}
	

}
